<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

<script src="./jquery.min.js"></script>
<script>
    let p1 = (url) => {
        return new Promise((resolve,reject) => {
            $.ajax({
                url,
                success(res) {
                    resolve(res)
                },
                error(err){
                    reject(err)
                }
            })
        })
    }
    p1('http://localhost:3000/play/hot').then(res=>{
        console.log(11,res);
        p1('http://localhost:3000/play/category').then(res=>{
            console.log(res);
        }).catch(err => {
            console.log(22,err);
        })
    })
</script>